<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>移动文件|<{$configcache['Title']}></title>
<link rel="stylesheet" type="text/css" href="__CSS__/content.css"  />
<link rel="stylesheet" type="text/css" href="__CSS__/public.css"  />
<script type="text/javascript" src="__JS__/jquery.js"></script>
<script type="text/javascript" src="__JS__/Public.js"></script>
<script type="text/javascript" src="__JS__/winpop.js"></script>
<script type="text/javascript" src="__JS__/check.js"></script>
<script type="text/javascript" src="__JS__/My97DatePicker/WdatePicker.js"></script>
<script>
$(document).ready(function() {
	var $dldd = $('#dl dd');
	$('.button').click(function() {
		var 
			sid=$dldd.find('.select').val(),							//目录
			moveid=$('#dl input:hidden').eq(-1).val();
		
		if (!tcheck(sid,'','目录ID获取失败')) { return false; }
		if (!tcheck(sid,'number','目录ID获取失败')) { return false; }
		if (!tcheck(moveid,'','没有获取到需要移动的文件')) { return false; }
		
		wintq('正在处理，请稍后...',4,20000,0,'');
		$.ajax({
			url:'__APP__/File/filemovedo',
			dataType:'json',
			type:'POST',
			data:'sid='+sid+'&moveid='+moveid,
			success: function(data) {
				if (data.s=='ok') {
					wintq('文件移动成功',1,2000,0,'');
					setTimeout(function() {
						window.parent.location.reload();
					},1000);
				}else {
					wintq(data.s,3,1000,1,'');
				}
			}
		});
	});
});
</script>
</head>
<body>
<div id="content">
	<dl id="dl">
    	<dt>移动选中文件到其它目录</dt>
        <dd>
        	<span class="dd_left">选择目录：</span>
            <span class="dd_right">
            	<select name="sid" class="select">
                    <option value="0">顶级目录</option>
                    <foreach name="list" item="l">
                    	<option value="<{$l.ID}>" <if condition="$sid eq $l['ID']">selected</if> ><if condition="$l['html'] neq ''">└<{$l.html}></if><{$l.classname}></option>
                    </foreach>
                </select><font>* 选择保存目录</font>
            </span>
        </dd>
        </dd><input type="hidden" value="<{$moveid}>" />
        <dd><input type="button" class="button" value="提 交" /></dd>
    </dl>
</div>
</body>
</html>
